 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Stiggy
{
    public partial class FormHammerFall : Form
    {
        public List<HammerFall> dp = new List<HammerFall>();
        
        public FormHammerFall()
        {
            InitializeComponent();
        }
        public FormHammerFall(Dis D)
        {
            InitializeComponent();
            dp = D.discography;
        }

        int flLng;

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox1.Checked)
            {
                flLng += ((GloryToTheBrave)dp[0]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((GloryToTheBrave)dp[0]).leng;
                label1.Text = (flLng.ToString());
            }
        }


        private void checkBox2_CheckedChanged_1(object sender, EventArgs e)
        {
            if (checkBox2.Checked)
            {
                flLng += ((LegacyOfKings)dp[1]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((LegacyOfKings)dp[1]).leng;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox3_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox3.Checked)
            {
                flLng += ((Renegade)dp[2]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((Renegade)dp[2]).leng;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox4_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox4.Checked)
            {
                flLng += ((CrimsonThunder)dp[3]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((CrimsonThunder)dp[3]).leng;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox5_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox5.Checked)
            {
                flLng += ((Threshhold)dp[4]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((Threshhold)dp[4]).leng;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox6_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox6.Checked)
            {
                flLng += ((CD1)dp[5]).leng1;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((CD1)dp[5]).leng1;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox7_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox7.Checked)
            {
                flLng += ((CD2)dp[6]).leng2;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((CD2)dp[6]).leng2;
                label1.Text = (flLng.ToString());
            }
        }

        private void checkBox8_CheckedChanged(object sender, EventArgs e)
        {
            if (checkBox8.Checked)
            {
                flLng += ((Masterpieces)dp[7]).leng;
                label1.Text = (flLng.ToString());

            }
            else
            {
                flLng -= ((Masterpieces)dp[7]).leng;
                label1.Text = (flLng.ToString());
            }
        }


    }
}
